from docx.enum.text import WD_PARAGRAPH_ALIGNMENT

from datareport.api.annotation.Font import Font
from datareport.api.annotation.Style import style
from datareport.impl.paragraph.base.BaseParagraph import BaseParagraph


@style(alignment=WD_PARAGRAPH_ALIGNMENT.CENTER)
class Date_3(BaseParagraph):

    def __init__(self):
        super().__init__()
        self.sort = 2
        self.section = 1

    def start(self, conn, year, plt):
        self.fonts.append(Font(text='{}年1月'.format(year), bold=True))
